package com.lianda.mutiple.pattern.aobj.general;

import com.lianda.mutiple.pattern.aobj.example.OrderService;
import com.lianda.mutiple.pattern.future.Future;

public class GeneralTest {
    public static void main(String[] args) throws Exception {
        //通用工厂做Active Object
        OrderService orderService = ActiveServiceFactory.active(new NewOrderServiceImpl());
        Future<String> future = orderService.findOrderDetails(23423);
        System.out.println("I will be returned immediately");
        System.out.println(future.get());
    }
}
